import jieba
import matplotlib.pyplot as plt
from wordcloud import WordCloud
with open("某电商平台某款连衣裙的商品评价.txt")as file:
    text=file.read()
words=jieba.lcut(text)
words_str=''.join(words)
wordcloud=WordCloud(width=800,height=600,background_color='white',max_words=200,colormap='viridis',font_path='simhei.ttf').generate(words_str)
plt.figure(figsize=(10,6))
plt.title('某电商平台某款连衣裙的商品词云图',fontsize=20,pad=20)
plt.imshow(wordcloud)
plt.axis('off')